package hsh.second;

public class arrayStock {
    public static void main(String[] args){
        double [] stock = {10.4,-3,-6.2,1.2,-6.1,-19,-3.8,0.9,-4.5,5.5};
        int countN = 0;
        int countF = 0;

        for(int i = 0; i < stock.length; i++){
            if(stock[i]>0){
                countN+=1;
            }else {
                countF+=1;
            }

        }
        System.out.println("赚钱的股票有："+countN+"支");
        System.out.println("赔钱的股票有："+countF+"支");
    }
}
